<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>18. Interprocess Communication and Networking &mdash; Python v2.6.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.6.2',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python v2.6.2 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python v2.6.2 documentation" href="../index.html" />
    <link rel="up" title="The Python Standard Library" href="index.html" />
    <link rel="next" title="18.1. subprocess — Subprocess management" href="subprocess.html" />
    <link rel="prev" title="17.9. rlcompleter — Completion function for GNU readline" href="rlcompleter.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="subprocess.html" title="18.1. subprocess — Subprocess management"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="rlcompleter.html" title="17.9. rlcompleter — Completion function for GNU readline"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v2.6.2 documentation</a> &raquo;</li>

          <li><a href="index.html" accesskey="U">The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="interprocess-communication-and-networking">
<span id="ipc"></span><h1>18. Interprocess Communication and Networking<a class="headerlink" href="#interprocess-communication-and-networking" title="Permalink to this headline">¶</a></h1>
<p>The modules described in this chapter provide mechanisms for different processes
to communicate.</p>
<p>Some modules only work for two processes that are on the same machine, e.g.
<a title="Set handlers for asynchronous events." class="reference external" href="signal.html#module-signal"><tt class="xref docutils literal"><span class="pre">signal</span></tt></a> and <a title="Subprocess management." class="reference external" href="subprocess.html#module-subprocess"><tt class="xref docutils literal"><span class="pre">subprocess</span></tt></a>.  Other modules support networking protocols
that two or more processes can used to communicate across machines.</p>
<p>The list of modules described in this chapter is:</p>
<ul>
<li class="toctree-l1"><a class="reference external" href="subprocess.html">18.1. <tt class="docutils literal"><span class="pre">subprocess</span></tt> &#8212; Subprocess management</a><ul>
<li class="toctree-l2"><a class="reference external" href="subprocess.html#using-the-subprocess-module">18.1.1. Using the subprocess Module</a><ul>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#convenience-functions">18.1.1.1. Convenience Functions</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#exceptions">18.1.1.2. Exceptions</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#security">18.1.1.3. Security</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="subprocess.html#popen-objects">18.1.2. Popen Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="subprocess.html#replacing-older-functions-with-the-subprocess-module">18.1.3. Replacing Older Functions with the subprocess Module</a><ul>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#replacing-bin-sh-shell-backquote">18.1.3.1. Replacing /bin/sh shell backquote</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#replacing-shell-pipeline">18.1.3.2. Replacing shell pipeline</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#replacing-os-system">18.1.3.3. Replacing os.system()</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#replacing-the-os-spawn-family">18.1.3.4. Replacing the os.spawn family</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#replacing-os-popen-os-popen2-os-popen3">18.1.3.5. Replacing os.popen, os.popen2, os.popen3</a></li>
<li class="toctree-l3"><a class="reference external" href="subprocess.html#replacing-functions-from-the-popen2-module">18.1.3.6. Replacing functions from the popen2 module</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="socket.html">18.2. <tt class="docutils literal"><span class="pre">socket</span></tt> &#8212; Low-level networking interface</a><ul>
<li class="toctree-l2"><a class="reference external" href="socket.html#socket-objects">18.2.1. Socket Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="socket.html#example">18.2.2. Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="ssl.html">18.3. <tt class="docutils literal"><span class="pre">ssl</span></tt> &#8212; SSL wrapper for socket objects</a><ul>
<li class="toctree-l2"><a class="reference external" href="ssl.html#functions-constants-and-exceptions">18.3.1. Functions, Constants, and Exceptions</a></li>
<li class="toctree-l2"><a class="reference external" href="ssl.html#sslsocket-objects">18.3.2. SSLSocket Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="ssl.html#certificates">18.3.3. Certificates</a></li>
<li class="toctree-l2"><a class="reference external" href="ssl.html#examples">18.3.4. Examples</a><ul>
<li class="toctree-l3"><a class="reference external" href="ssl.html#testing-for-ssl-support">18.3.4.1. Testing for SSL support</a></li>
<li class="toctree-l3"><a class="reference external" href="ssl.html#client-side-operation">18.3.4.2. Client-side operation</a></li>
<li class="toctree-l3"><a class="reference external" href="ssl.html#server-side-operation">18.3.4.3. Server-side operation</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="signal.html">18.4. <tt class="docutils literal"><span class="pre">signal</span></tt> &#8212; Set handlers for asynchronous events</a><ul>
<li class="toctree-l2"><a class="reference external" href="signal.html#example">18.4.1. Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="popen2.html">18.5. <tt class="docutils literal"><span class="pre">popen2</span></tt> &#8212; Subprocesses with accessible I/O streams</a><ul>
<li class="toctree-l2"><a class="reference external" href="popen2.html#popen3-and-popen4-objects">18.5.1. Popen3 and Popen4 Objects</a></li>
<li class="toctree-l2"><a class="reference external" href="popen2.html#flow-control-issues">18.5.2. Flow Control Issues</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="asyncore.html">18.6. <tt class="docutils literal"><span class="pre">asyncore</span></tt> &#8212; Asynchronous socket handler</a><ul>
<li class="toctree-l2"><a class="reference external" href="asyncore.html#asyncore-example-basic-http-client">18.6.1. asyncore Example basic HTTP client</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="asynchat.html">18.7. <tt class="docutils literal"><span class="pre">asynchat</span></tt> &#8212; Asynchronous socket command/response handler</a><ul>
<li class="toctree-l2"><a class="reference external" href="asynchat.html#asynchat-auxiliary-classes-and-functions">18.7.1. asynchat - Auxiliary Classes and Functions</a></li>
<li class="toctree-l2"><a class="reference external" href="asynchat.html#asynchat-example">18.7.2. asynchat Example</a></li>
</ul>
</li>
</ul>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="rlcompleter.html"
                                  title="previous chapter">17.9. <tt class="docutils literal"><span class="pre">rlcompleter</span></tt> &#8212; Completion function for GNU readline</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="subprocess.html"
                                  title="next chapter">18.1. <tt class="docutils literal"><span class="pre">subprocess</span></tt> &#8212; Subprocess management</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/library/ipc.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="subprocess.html" title="18.1. subprocess — Subprocess management"
             >next</a> |</li>
        <li class="right" >
          <a href="rlcompleter.html" title="17.9. rlcompleter — Completion function for GNU readline"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v2.6.2 documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; <a href="../copyright.html">Copyright</a> 1990-2009, Python Software Foundation.
      Last updated on Apr 15, 2009.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.1.
    </div>
  </body>
</html>